<?php
// +----------------------------------------------------------------------
// | Plugin.
// +----------------------------------------------------------------------
// | Copyright (c) 2016 http://www.suckseed.cn, All rights reserved.
// +----------------------------------------------------------------------
// | Author: wjf <184521508@qq.com> 2017-06-29
// +----------------------------------------------------------------------

namespace wjf\controller;

use think\App;
use think\Loader;

class Plugin extends HomeBase
{
    public function index($_pligin, $_controller, $_action){
        $_controller = Loader::parseName($_controller, 1);

        $_pliginControllerClass = "plugins||{$_pligin}\\controller\\{$_controller}";
        $vars = [];
        return App::invokeMethod([$_pliginControllerClass,$_action, $vars]);
    }
}